<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			div.box {
				position: fixed;
				bottom: 10px;
				right: 10px;
				background: crimson;
				width: 200px;
				padding: 10px;
			}

			div.close {
				position: absolute;
				right: 10px;
				top: 10px;
				width: 20px;
				height: 20px;
				text-align: center;
				line-height: 20px;
				background: black;
				color: white;
				cursor: pointer;
			}

			p {
				line-height: 20px;
			}
		</style>
	</head>
	<body>
		<div class="box">
			<div class="close">x</div>
			<div class="content">
				<p>我是流氓广告！</p>
				<p>我是流氓广告！</p>
				<p>我是流氓广告！</p>
				<p>我是流氓广告！</p>
			</div>
		</div>
		<script type="text/javascript">
			var oclose = document.getElementsByClassName("close")[0];
			var obox = document.getElementsByClassName("box")[0];
			oclose.onclick = function() {
				obox.style.display = "none";
			}

			setInterval(function() {
				obox.style.display = "block";
			}, 3000)
		</script>
	</body>
</html>
